package test.com.cardgroup.cbrp.springmem.aop;

import com.cardgroup.cbrp.springmem.annotations.ReadSingleCache;
import com.cardgroup.cbrp.springmem.annotations.ReadStaticCache;
import com.cardgroup.cbrp.springmem.annotations.UpdateGroupCache;

public class ServiceBean {
	private String testStr = "testStr";
	
	@ReadSingleCache(namespace="test_service", group="test1", expiration=1000)
	public String testService1(String p1, String p2){
		System.out.print("here is test service 1");
		return testStr;
	}
	
	@ReadSingleCache(namespace="test_service", group="test1", expiration=1000)
	public String testService2(String p1, String p2){
		System.out.print("here is test service 1");
		return testStr;
	}
	
	@UpdateGroupCache(namespace="test_service", group="test1")
	public void updateService1(String p1){
		testStr = p1;
	}
	
	@ReadStaticCache(namespace="test_service", expiration=1000)
	public String readStaticService(String p1){
		return testStr;
	}
	
	public String getTestStr() {
		return testStr;
	}
	public void setTestStr(String testStr) {
		this.testStr = testStr;
	}
	
	
}
